#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QTimer>
#include <QFile>

#include "mythread.h"
#include <memory>
#include "tomatoclock.h"

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

    void update_count();
    void dealTimeout();
    void dealDone();
    void stopThread();


private slots:
    void on_start_clicked();

    void on_clearStage_clicked();

private:
    Ui::MainWindow *ui;

    QTimer *displayTime;
    MyThread *thread;

    uint64_t todayCount;
    uint64_t stageCount;
    int count;

    std::shared_ptr<TomatoClock> tomatoClock_;
};
#endif // MAINWINDOW_H
